/**
 * @projectName: com.xiayuanxing.designPattern
 * @className: ToyDuck
 * @author: xiayuanxing
 * @description: TODO
 * @date: 2022/2/11 11:23
 * @version: 1.0
 */
public class ToyDuck extends Duck{

    public ToyDuck() {
        flyBehavior= new NoFlyBehavior();
    }

    @Override
    public void display() {
        System.out.println("~~玩具鸭~~");
    }

    @Override
    public void quack() {
        System.out.println("玩具鸭不能叫~~");
    }

    @Override
    public void swim() {
        System.out.println("玩具鸭不会游泳~~");
    }
}
